/**
 * 
 */
package uk.co.cdal.cobweb.frontend.GUI;

import java.awt.GridLayout;
import java.util.ArrayList;

import javax.swing.JPanel;

/**
 * @author seb
 * @version 1 revision 0
 *
 */
public class URLPanel extends JPanel {
	
	public URLPanel(ArrayList<String> urls) {
		
		// Set the grid layout up so the number of 
		// rows is equal to the number of elements in the arraylist
		setLayout(new GridLayout(urls.size() + 1, 1));
		
		/*
		 * For each url add a button to remove the url
		 * Add an extra sapce for button to add a new URL 
		 */
		for(int i = 0; i < urls.size(); i++) {
			add(new URLDisplay(urls.get(i)));
		}
		
		add(new URLDisplay());
	}

}
